import axios from "axios";
const url = 'http://127.0.0.1:8080/'
axios.defaults.baseURL = url  /* 网络请求的基础路径 */
const doGet = (url:string,data?:object) => axios.get(url,data)/* 查询 */
const doPost = (url:string,data:object) => axios.post(url,data)/* 新增 */
const doPut = (url:string,data:object) => axios.put(url,data)/* 修改 */
const doDelete = (url:string) => axios.delete(url)/* 删除 */
export default{
    doGet,doPost,doPut,doDelete,url,
}